﻿using System.Collections.Generic;
using Dapper;
using Microsoft.Extensions.Configuration;

namespace dataXJobGenerator
{
    public static class ConfigurationExtend
    {
        public static IEnumerable<string> GetValues(this IConfiguration configuration, string key)
        {
            return configuration.GetSection(key).GetChildren().AsList().ConvertAll(section => section.Value);
        }
        public static string GetValue(this IConfiguration configuration, string key)
        {
            return configuration.GetSection(key).Value;
        }
    }
}